<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>JavaScript 逻辑运算示例</title>
    <script>
        // 初始化变量
        var a = 1, b = 2, c = 3, d = 4;

        // 输出变量的值
        document.write("<p>a = " + a + " , b = " + b + " , c = " + c + " , d = " + d + "</p>");

        // 使用 document.write 输出逻辑运算结果
        document.write("<ul>");
        document.write("<li>(a > b) && (c < d) = " + ((a > b) && (c < d)) + "</li>"); // false && true = false
        document.write("<li>(a > b) || (c < d) = " + ((a > b) || (c < d)) + "</li>"); // false || true = true
        document.write("<li>!(a > b) && (c < d) = " + (!(a > b) && (c < d)) + "</li>"); // true && true = true
        document.write("<li>(a > b) && (++c < d) = " + ((a > b) && (++c < d)) + "</li>"); // false && (4 < 4) = false
        document.write("</ul>");
    </script>
</head>
<body>
    <h1>JavaScript 逻辑运算结果</h1>
    <p>请查看网页正文部分的输出内容。</p>
</body>
</html>